﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace NTQOnlineExam.Services.EntityFW.Entity
{
    public class Term
    {
        public int TermId { get; set; }
        public string TermName { get; set; }
        public string Description { get; set; }
        public decimal? Price { get; set; }
        public bool IsPublished { get; set; }
        public int? YearId { get; set; }
    }

    public class TermMap : EntityTypeConfiguration<Term>
    {
        public TermMap()
        {
            this.HasKey(t => t.TermId);
            this.Property(t => t.TermId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.ToTable("Term");
        }
    }
}



